package com.hc.feign;

import com.hc.domain.Account;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "seata-at-account")
public interface AccountFeignClient {

    @GetMapping("/account/{id}")
    Account findAccountById(@PathVariable("id") int id);


    @GetMapping("/account/reduceMoney")
    String reduceMoney(@RequestParam("accountId") int accountId, @RequestParam("money") double money);
}
